import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/main'
  },
  {
    path: '/main',
    name: 'main',
    component: () => import('../views/Main.vue')
  },
  {
    path: '/order',
    name: 'order',
    component: () => import('../views/Order.vue')
  },
  {
    path: '/take',
    name: 'take',
    component: () => import('../views/Take.vue')
  },
  {
    path: '/mine',
    name: 'mine',
    component: () => import('../views/Mine.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/Register.vue')
  },
  {
    path: '/userinfo',
    name: 'userinfo',
    component: () => import('../views/Userinfo.vue')
  },
  {
    path: '/payment',
    name: 'payment',
    component: () => import('../views/Payment.vue')
  },
  {
    path: '/cdkey',
    name: 'cdkey',
    component: () => import('../components/Cdkey.vue')
  },
  {
    path: '/coupon',
    name: 'coupon',
    component: () => import('../components/Coupon.vue')
  },
  {
    path: '/invalidcoupon',
    name: 'invalidcoupon',
    component: () => import('../components/Invalidcoupon.vue')
  },
  {
    path: '/myintegral',
    name: 'myintegral',
    component: () => import('../components/Myintegral.vue')
  },
  {
    path: '/integral',
    name: 'integral',
    component: () => import('../components/Integral.vue')
  },
  {
    path: '/integraldetail',
    name: 'integraldetail',
    component: () => import('../components/Integraldetail.vue')
  },
  {
    path: '/valuecard',
    name: 'valuecard',
    component: () => import('../components/Valuecard.vue')
  },
  {
    path: '/member',
    name: 'member',
    component: () => import('../components/Membergrade.vue')
  },
  {
    path: '/welfare',
    name: 'welfare',
    component: () => import('../components/Welfare.vue')
  },
  {
    path: '/membercode',
    name: 'membercode',
    component: () => import('../components/Membercode.vue')
  },
  {
    path: '/orderfrom',
    name: 'orderfrom',
    component: () => import('../components/Orderfrom.vue')
  },
  {
    path: '/address',
    name: 'address',
    component: () => import('../components/Address.vue')
  },
  {
    path: '/addaddress',
    name: 'addaddress',
    component: () => import('../components/Addaddress.vue')
  }
]
const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
